﻿#include "dialog.h"
#include "ui_dialog.h"

Dialog::Dialog(QWidget *partent):
    QDialog(partent),
    dialog(new Ui::Dialog)
{
    dialog->setupUi(this);
    setWindowTitle(QStringLiteral("参数设置"));
}

Dialog::~Dialog()
{
    delete dialog;
}

void Dialog::set_value(int value[])
{
    dialog->spinBox->setValue(value[0]);
    dialog->spinBox_2->setValue(value[1]);
    dialog->spinBox_3->setValue(value[2]);
}

void Dialog::on_pushButton_clicked()
{
    int value[3];
    value[0]=dialog->spinBox->value();
    value[1]=dialog->spinBox_2->value();
    value[2]=dialog->spinBox_3->value();
    sig_send_value(value);
    setVisible(false);
}

void Dialog::on_pushButton_2_clicked()
{
    setVisible(false);
}
